package kislo.dima.task1;

import java.util.StringTokenizer;

/***
 * 
 * @author Dima Kislo
 *
 */

public class Main {

	public static void main(String[] args) {
		//m*n
		int m = Integer.parseInt(args[0]);
		int n = Integer.parseInt(args[1]);
		
		//[a,b]
		int a, b;
		String range = args[2].substring(1, args[2].length() - 1);
		StringTokenizer st = new StringTokenizer(range, ",");	
		a = Integer.parseInt(st.nextToken());
		b = Integer.parseInt(st.nextToken());
		
		//new Matrix
		Matrix p = MatrixFactory.createMatrix(m, n, a, b);
		System.out.println(p);

		System.out.println("Min coordinate:");
		for (Coordinate cmin : p.coordinateMin())
			System.out.println(cmin);

		System.out.println("Max coordinate:");
		for (Coordinate cmax : p.coordinateMax())
			System.out.println(cmax);

	}

}
